/****************************************************
          File Name:mq.h
          Author: Abby Cin
          Mail: abbytsing@gmail.com
          Created Time: Sun 21 Sep 2014 09:20:11 AM CST
*****************************************************/

#include<stdio.h>
#include<unistd.h>
#include<stdlib.h>
#include<errno.h>
#include<sys/types.h>
#include<sys/stat.h>
#include<fcntl.h>
#include<mqueue.h>
#include<time.h>        /* mq_timedsend mq_timedreceive */
#include<string.h>      /* strcmp , memset and etc. */

#define SERVER "/server"
#define CLIENT1 "/client1" 
#define CLIENT2 "/client2"
#define CLIENT3 "/client3"

#define MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP)

void err(char *fun)
{
    perror(fun);
    exit(errno);
}
